package com.jysz.certificate.persistence.enums.applyAdd;


public enum ApplyAddType {
	NOTSTART("暂存", 0), SUBMITED("已提交", 1), REFUSED("已退回", 2), FINISH("已通过", 3);
	  //名称
    private String name;
    //索引
    private int index;   
    private ApplyAddType(String name, int index) {   
        this.name = name;   
        this.index = index;   
    }   
    
    //根据索引获得名称
    public static String getName(int index) {   
        for (ApplyAddType c : ApplyAddType.values()) {   
            if (c.getIndex() == index) {   
                return c.name;   
            }   
        }   
        return null;   
    }
    //根据索引获得枚举
    public static ApplyAddType index(int index) {   
        for (ApplyAddType w : ApplyAddType.values()) {   
            if (w.getIndex() == index) {   
                return w;   
            }   
        }   
        return null;   
    }
    
    public String getName() {   
        return name;   
    }   
    public void setName(String name) {   
        this.name = name;   
    }   
    public int getIndex() {   
        return index;   
    }   
    public void setIndex(int index) {   
        this.index = index;   
    }   

}
